package request;

import util.HashedPassword;

/**
 * NewSessionRequest is used to create a new session between the client, server, and database.
 * @author Sean Freitag
 * @author Jacob Freemyer
 * @author Stephan Jossie
 *
 */
@SuppressWarnings("serial")
public class NewSessionRequest implements Request {
	/**
	 * Identifier for the requested user
	 */
	private String email;
	
	/**
	 * Password of user
	 */
	private HashedPassword password;
	
	/**
	 * Creates a NewSessionRequest instance that creates a new session from the username and password of the user.
	 */
	public NewSessionRequest() {
	
	}

	/**
	 * Getter for email or username
	 * @return
	 * 		The email address or username of user.
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * Getter for password
	 * @return
	 * 		The password of the user. 
	 */
	public HashedPassword getPassword() {
		return password;
	}
	
	/**
	 * Setter to set the email/username of the session
	 * @param pEmail
	 * Username
	 */
	public void setEmail(String pEmail)
	{
		email = pEmail;
	}
	
	/**
	 * Setter to set the password of the session
	 * @param pPassword
	 * Password
	 */
	public void setPassword(HashedPassword pPassword)
	{
		password = pPassword;
	}
}
